package com.hskn.hss.module.workkaoqin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.hskn.hss.utils.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalTime;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class WorkKaoqin implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 考勤段id
     */
    @TableId(value = "work_kaoqin_id", type = IdType.ASSIGN_UUID)
    private String workKaoqinId;

    /**
     * 考勤段名称
     */
    private String name;

    /**
     * 上班时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime sbsj;

    /**
     * 下班时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime xbsj;

    /**
     * 夏上班时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime xsbsj;

    /**
     * 夏下班时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime xxbsj;

    /**
     * 冬上班时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime dsbsj;

    /**
     * 冬下班时间
     */
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime dxbsj;


    public String getSbsj() {
        return StringUtils.localtimeToStr(sbsj);
    }

    public LocalTime getSbsjTime() {
        return sbsj;
    }

    public String getXbsj() {
        return StringUtils.localtimeToStr(xbsj);
    }

    public LocalTime getXbsjTime() {
        return xbsj;
    }

    public String getXsbsj() {
        return StringUtils.localtimeToStr(xsbsj);
    }

    public LocalTime getXsbsjTime() {
        return xsbsj;
    }

    public String getXxbsj() {
        return StringUtils.localtimeToStr(xxbsj);
    }

    public LocalTime getXxbsjTime() {
        return xxbsj;
    }

    public String getDsbsj() {
        return StringUtils.localtimeToStr(dsbsj);
    }

    public LocalTime getDsbsjTime() {
        return dsbsj;
    }

    public String getDxbsj() {
        return StringUtils.localtimeToStr(dxbsj);
    }

    public LocalTime getDxbsjTime() {
        return dxbsj;
    }
}
